import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter)

const router = new VueRouter({
    routes:[
        {
            path:'/',
            name:'home',
            component:()=>{
                return import('./components/home.vue')
            }
        },
        {
            path:'/classify',
            name:'classify',
            component:() => {
                return import('./components/classify.vue')
            }
        },
        {
            path:'/cart',
            name:'cart',
            component:()=>{
                return import('./components/cart.vue')
            }
        },
        {
            path:'/login',
            name:'login',
            component:()=>{
                return import('./components/login.vue')
            }
        },
        {
            path:'/detail/:id',
            name:'detail',
            component:() => {
                return import('./components/detail.vue')
            }
        }
    ]
})

export default router